package com.corundumstudio.socketio.protocol;

import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.ByteBufOutputStream;

import java.io.IOException;
import java.util.List;

/**
 * Created by alex on 15-7-20.
 */
public interface JsonSupport {

    AckArgs readAckArgs(ByteBufInputStream src, AckCallback<?> callback) throws IOException;

    <T> T readVallue(String namespaceName, ByteBufInputStream src, Class<T> valueType) throws IOException;

    void writeValue(ByteBufOutputStream out, Object value) throws IOException;

    void addEventMapping(String namespaceName, String eventName, Class<?>... eventClass);

    void removeEventMapping(String namespaceName, String eventName);

    List<Byte[]> getArrays();
}
